package ysq.xyg.host.model.po;

import lombok.NoArgsConstructor;

import lombok.Data;
import ysq.xyg.base.util.BaseConstant;
import ysq.xyg.base.util.BaseUtil;
import ysq.xyg.sys.model.po.SysUser;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 房产-轮播图实体类
 *
 * @author congcong tao
 * @date 2019-12-11 15:25:49
 */
@Data
@NoArgsConstructor
@Table(name = "xyg_host_banner")
public class HostBanner implements Serializable{

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 应用主键
     */ 
	@Column(name = "account_id")
	private String accountId;

	/**
     * 城市主键
     */ 
	@Column(name = "city_id")
	private String cityId;

	/**
     * 范围类型1=首页
     */ 
	@Column(name = "scope_type")
	private String scopeType;

	/**
     * 类型1=图片2=视频
     */ 
	@Column(name = "type")
	private String type;

	/**
     * 跳转
     */ 
	@Column(name = "url")
	private String url;

	/**
     * 跳转地址
     */ 
	@Column(name = "jump_url")
	private String jumpUrl;

	/**
     * 跳转类型1=原页面保存跳转2=删除原页面跳转
     */ 
	@Column(name = "jump_type")
	private String jumpType;

	/**
     * 是否展示1=是2=否
     */ 
	@Column(name = "show_type")
	private String showType;

	/**
     * 排序
     */ 
	@Column(name = "order_num")
	private Integer orderNum;

	/**
     * 创建者
     */ 
	@Column(name = "create_user")
	private String createUser;

	/**
     * 更新者
     */ 
	@Column(name = "update_user")
	private String updateUser;

	/**
     * 删除状态1、未删除2、已删除
     */ 
	@Column(name = "remove_tag")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "create_time")
	private Date createTime;

	/**
     * 更新时间
     */ 
	@Column(name = "update_time")
	private Date updateTime;

	public HostBanner(SysUser sysUser) {
		this.id= BaseUtil.uId();
		this.accountId = sysUser.getAccountId();
		this.removeTag= BaseConstant.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.createUser = sysUser.getId();
		this.updateTime = new Date();
		this.updateUser = sysUser.getId();
	}
}